import { redirect } from "react-router";
import type { Route } from "./+types/delete-device";
import { DeleteDevice } from "~/lib/server";


export async function clientAction({ params }: Route.ActionArgs) {

    await DeleteDevice(params.deviceId);
    return redirect(`/locations/${params.locationId}`);
}
